package com.tfjybj.itoo.exam.provider.service.impl;

import org.apache.dubbo.config.annotation.Reference;;
import com.dmsdbj.itoo.tool.base.service.impl.BaseServicePlusImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.tfjybj.itoo.exam.entity.AcademyEntity;
import com.tfjybj.itoo.exam.model.AcademyModel;
import com.tfjybj.itoo.exam.provider.dao.AcademyDao;
import com.tfjybj.itoo.exam.provider.service.AcademyService;
import com.tfjybj.itoo.teach.FacadeApi.AcademyApi;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * AcademyService接口实现类
 * ${base}表
 *
 * @author 杨江涛
 * @version 2.0.0
 * @since 2.0.0 2018-11-16 20:35:34
 */
@Service("academyService")
public class AcademyServiceImpl extends BaseServicePlusImpl<AcademyDao, AcademyEntity> implements AcademyService {

    //region 模板生成

    @Resource
    private AcademyDao academyDao;

    @Reference(check = false)
    private AcademyApi academyApi;

    @Override
    public PageInfo<AcademyEntity> queryByLikeName(String name, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return new PageInfo<>(academyDao.queryLikeName(name));
    }

    //endregion

    /* **********************************以下为非模板生成的内容********************************* */

    @Override
    public List<AcademyEntity> findAcademy() {
        return academyDao.findAcademy();
    }

    @Override
    public List<AcademyModel> selAcademy() {
        return academyDao.selAcademy();
    }

}
